//
//  ForumTableViewCellTwo.m
//  CarHome
//
//  Created by 小伍 on 14-9-18.
//  Copyright (c) 2014年 WJN_work@163.com. All rights reserved.
//

#import "ForumTableViewCellTwo.h"

@implementation ForumTableViewCellTwo
- (void)dealloc
{
    [_image release];
    _image = nil;
    [_labelRightDown release];
    _labelRightDown = nil;
    [_labelRightUp release];
    _labelRightUp = nil;
    [super dealloc];
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        UIColor * color = [UIColor colorWithWhite:0.1 alpha:0.2];
        //左侧侧图片
        _image = [[UIImageView alloc]initWithFrame:CGRectZero];

        [self.contentView addSubview:_image];
        //右上侧
        _labelRightUp = [[UILabel alloc]initWithFrame:CGRectZero];
        _labelRightUp.font = [UIFont systemFontOfSize:14];
        [_labelRightUp setTextColor:[UIColor blackColor]];
        _labelRightUp.numberOfLines = 0;
        
        _labelRightUp.layer.cornerRadius = 4;
        [_labelRightUp.layer setBackgroundColor:color.CGColor];
        
        [self.contentView addSubview:_labelRightUp];
        //右下侧
        _labelRightDown= [[UILabel alloc]initWithFrame:CGRectZero];
        _labelRightDown.font = [UIFont systemFontOfSize:14];
        [_labelRightDown setTextColor:[UIColor redColor]];
        [_labelRightDown.layer setBackgroundColor:color.CGColor];
        _labelRightDown.numberOfLines = 0;
        _labelRightDown.layer.cornerRadius = 4;

        _labelRightDown.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_labelRightDown];
        
        //分割线

        UILabel * label = [[UILabel alloc]initWithFrame:CGRectMake(205, 105, 110, 1)];

        [label setBackgroundColor:[UIColor redColor]];
        [self.contentView addSubview:label];
    }
    return self;
}

- (void)layoutSubviews
{
    _image.frame = CGRectMake(0, 5, 200, 150);
    _labelRightUp.frame = CGRectMake(205, 5, 110, 95);
    _labelRightDown.frame = CGRectMake(205, 110, 110, 40);
    [super layoutSubviews];
}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
